package cn.zc.curriculum.service.config.hander;


import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.PathResource;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
import org.springframework.core.io.Resource;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;


/**
 * 请求处理器，处理视频流配置类
 */
@Component
public class VideoResourceHttpRequestHandler extends ResourceHttpRequestHandler {
    //文件根路径
    public String path;

    @Override
    protected Resource getResource(HttpServletRequest request) throws IOException{

        return new PathResource(path);
    }
}
